package com.explorati.design_pattern.creational.prototype.clone.example;

import java.util.Date;

public class Mail implements Cloneable {

	private String receiver;
	private String subject;
	private String applellation;
	private String context;
	private String tail;
	private Date date;

	public Mail(String subject, String context) {
		this.subject = subject;
		this.context = context;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getApplellation() {
		return applellation;
	}

	public void setApplellation(String applellation) {
		this.applellation = applellation;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getTail() {
		return tail;
	}

	public void setTail(String tail) {
		this.tail = tail;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Override
	protected Object clone() throws CloneNotSupportedException {
		return super.clone();
	}
	
	/**
	 * 深克隆-
	 */
//	@Override
//	protected Object clone() throws CloneNotSupportedException {
//		Mail mail = (Mail) super.clone();
//		mail.date = (Date) mail.date.clone();
//		return mail;
//	}

}
